import request from './request'


const getCaousel = ()=> {
    return request.get('/carousel')
}

const getHot = ()=> {
    return request.get('/hotarticle')
}

const getAriticle = (id?:string)=> {
    return id ?  request.get(`/articlelist?id=${id}`) : request.get('/articlelist')
}

const getRecommend = ()=> {
    return request.get('/recommended')
}

const getRanking = (ID:{firstId:string ,secondId:string })=> {
    return request.get(`/ranking?firstId=${ID.firstId}&secondId=${ID.secondId}`)
}


export {
    getCaousel,
    getHot,
    getAriticle,
    getRecommend,
    getRanking
}